import QtQuick 2.0
Rectangle {
    id: tech
    width: 800
    height: 480
    color:"grey"
    border.color: "grey"
    border.width: 10
    Rectangle
    {

        id: panel
        width: 150
        height: parent.height - parent.border.width*2
        anchors.left: parent.left
        anchors.leftMargin: parent.border.width
        anchors.verticalCenter: parent.verticalCenter
        color: "grey"
        border.color: "black"
        border.width: 1
      Column
        {
            y:15
            spacing: 15
            anchors.horizontalCenter: parent.horizontalCenter
            CR_TextInput
            {
                id: ti_01
                plcHolder: "from"
            }
            CR_TextInput
            {
                id: ti_02
                plcHolder: "to"
            }
            CR_TextInput
            {
                id: ti_03
                plcHolder: "steps"
            }
            CR_TextInput
            {
                id: ti_04
                plcHolder: "step"
            }
            CR_Button{
                id: button1
                otext:  "GO!"
                onGo:
                {
                    t_res.text = ""
                    CD.go(ti_01.val,ti_02.val,ti_03.val,ti_04.val);
                }
            }
            CR_Button{
                id: button2
                otext:  "default"
                onGo:
                {
                    ti_01.setText(1)
                    ti_02.setText(500)
                    ti_03.setText(10)
                    ti_04.setText(12)
                }
            }
        }
        Text
        {
            id:t_kNum
            width: 100
            height: 30
            anchors.horizontalCenter: parent.horizontalCenter
            anchors.bottom: parent.bottom
            verticalAlignment: Text.AlignVCenter
            horizontalAlignment: Text.AlignHCenter
            font.pointSize: 16
            text: kNum
            font.bold: true
        }
    }

    Rectangle
    {
        width: parent.width - panel.width-parent.border.width*2
        height: parent.height- parent.border.width*2
        anchors.left: panel.right
        anchors.leftMargin: panel.border.width
        anchors.verticalCenter: parent.verticalCenter
        border.color: "black"
        border.width: 1
        color:"#303030"
        Text {
            id: t_res
            color: "Limegreen"
            text: ""
            font.pointSize: 10
        }
    }
    Connections {
        target: CD
        onCheckIs : { t_kNum.text = kNum}
        onBingoIs : { t_res.text = t_res.text +"\n"+ bingoText}
    }
}
